home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / Clueless.swf / scripts / org / flintparticles / renderers / DisplayObjectRenderer.as next >
Encoding:
Text File  |  2011-10-17  |  1.1 KB  |  44 lines

  1. package org.flintparticles.renderers
  2. {
  3.    import flash.display.Sprite;
  4.    import org.flintparticles.particles.Particle;
  5.    
  6.    public class DisplayObjectRenderer extends Sprite implements Renderer
  7.    {
  8.        
  9.       
  10.       public function DisplayObjectRenderer()
  11.       {
  12.          super();
  13.          mouseEnabled = false;
  14.          mouseChildren = false;
  15.       }
  16.       
  17.       public function removeParticle(param1:Particle) : void
  18.       {
  19.          removeChild(param1.image);
  20.       }
  21.       
  22.       public function addParticle(param1:Particle) : void
  23.       {
  24.          addChildAt(param1.image,0);
  25.       }
  26.       
  27.       public function renderParticles(param1:Array) : void
  28.       {
  29.          var _loc2_:Particle = null;
  30.          var _loc3_:int = 0;
  31.          var _loc4_:int = 0;
  32.          _loc3_ = int(param1.length);
  33.          _loc4_ = 0;
  34.          while(_loc4_ < _loc3_)
  35.          {
  36.             _loc2_ = param1[_loc4_];
  37.             _loc2_.image.transform.colorTransform = _loc2_.colorTransform;
  38.             _loc2_.image.transform.matrix = _loc2_.matrixTransform;
  39.             _loc4_++;
  40.          }
  41.       }
  42.    }
  43. }
  44.